n=eval(input("Please input a number of layers"))
listPre=[1]
print(listPre)
for i in range(n-1):
    listTemp=listPre[:]
    listTemp.insert(0,0)
    listTemp.append(0)
    listNext=[]
    for i in range(len(listTemp)-1):
        listNext.append(listTemp[i]+listTemp[i+1])
    listPre=listNext
    print(listNext)

        
        
    
        